import java.util.Scanner;

public class Main {
    public  static int Factorial(int a){
        int c = 1;

        while (a != 1){

            c *= a;
            a--;
        }
        return c;
    }

    public static void main(String[] args) {

        Scanner Sc = new Scanner(System.in);
        System.out.println("你想求多少阶的阶乘：");
        int a = Sc.nextInt();
        int fac = Factorial(a);
        System.out.println(fac);
    }
}